package com.itheima.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface MemberMapper {
    /**
     * 查询所有会员的注册月份
     * @return
     */
    @Select("select DISTINCT regtime from t_member")
    List<LocalDate> getAllMonths();

    /**
     * 根据日期查询会员数量
     * @param beginDate
     * @param endDate
     * @return
     */
    Integer getMemberCountByDate(LocalDate beginDate, LocalDate endDate);
}
